<%@ page language="java" contentType="text/html; charset=utf-8"
    pageEncoding="utf-8"%>
<%@taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c" %>
<%@ taglib uri="http://java.sun.com/jsp/jstl/functions" prefix="fn"%>
<%
String path = request.getContextPath();
String basePath = request.getScheme()+"://"+request.getServerName()+":"+request.getServerPort()+path+"/";
%> 
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
	<head lang="en">
		<meta charset="utf-8" />
		<title>最家</title>
		<link rel="stylesheet" type="text/css" href="<%=basePath%>frontPage/css/public.css"/>
		<link rel="stylesheet" type="text/css" href="<%=basePath%>frontPage/css/myorder.css" />
	</head>
	<body>
		<!------------------------------head------------------------------>
		<jsp:include page="header1.jsp"></jsp:include>
		<!------------------------------idea------------------------------>
		<div class="address mt">
			<div class="wrapper clearfix">
				<a href="#" class="fl">首页</a>
				<span>/</span>
				<a href="">个人中心</a>
				<span>/</span>
				<a href="" class="on">我的订单</a>
			</div>
		</div>
		
		<!------------------------------Bott------------------------------>
		<div class="Bott">
			<div class="wrapper clearfix">
				<div class="zuo fl">
					<h3>
						<a href="#"><img src="<%=basePath%>frontPage/img/tx.png"/></a>
						<p class="clearfix"><span class="fl">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;${user.name }</span></p>
					</h3>
					<div>
						<h4>我的交易</h4>
						<ul>
							<li><a href="<%=basePath%>toShoppingCartPage/${userId}">我的购物车</a></li>
							<li class="on"><a href="<%=basePath%>findOrderInfo/${userId}/5">我的订单</a></li>
						</ul>
						<h4>个人中心</h4>
						<ul>
							<li><a href="<%=basePath%>toAddressPage/${userId}">地址管理</a></li>
						</ul>
						<h4>账户管理</h4>
						<ul>
							<li><a href="<%=basePath%>tomymessagePage/${userId}">个人信息</a></li>
							<li><a href="<%=basePath%>changepassword/${userId}">修改密码</a></li>
						</ul>
					</div>
				</div>
				<div class="you fl">
					<div class="my clearfix">
						<h2 class="fl">我的订单</h2>
						<a href="#" class="fl">请谨防钓鱼链接或诈骗电话，了解更多&gt;</a>
					</div>
					<div class="dlist clearfix">
						<ul class="fl clearfix" id="wa">
							<li class="on"><a href="<%=basePath%>findOrderInfo/${userId }/5">全部有效订单</a></li>
							<li><a href="<%=basePath%>findOrderInfo/${userId }/0">待支付</a></li>
							<li><a href="<%=basePath%>findOrderInfo/${userId }/1">待发货</a></li>
							<li><a href="<%=basePath%>findOrderInfo/${userId }/2">待收货</a></li>
							<li><a href="<%=basePath%>findOrderInfo/${userId }/3">待评价</a></li>
						</ul>
						<form action="#" method="get" class="fr clearfix">
							<input type="text" name="" id="" value="" placeholder="请输入商品名称、订单号" />
							<input type="button" name="" id="" value="" />
						</form>
					</div>
					<c:forEach items="${ordersInfo }" var="ordersInfo">
						<c:if test="${ordersInfo.status==4 }">
							<div class="dkuang">
								<p class="one">已收货</p>
								<div class="word clearfix">
									<ul class="fl clearfix">
										<li>${ordersInfo.createTime }</li>
										<li>${ordersInfo.orderId }</li>
										<li>${ordersInfo.name }</li>
										<li>在线支付</li>
									</ul>
									<p class="fr">订单金额：<span>${ordersInfo.money }</span>元</p>
								</div>
								<div class="shohou clearfix">								
									<p class="fl"><a href="#">${ordersInfo.pName }</a><a href="#">数量: ${ordersInfo.count }</a></p>
									<p class="fr">
										<a href="myprod.html">待评价</a>
										<a href="findOrderInfoDetails/${ordersInfo.id }/${ordersInfo.orderId }/${userId}">订单详情</a>
									</p>
								</div>
							</div>
						</c:if>
						<c:if test="${ordersInfo.status==0 }">
							<div class="dkuang deng">
								<p class="one">待支付</p>
								<div class="word clearfix">
									<ul class="fl clearfix">
										<li>${ordersInfo.createTime }</li>
										<li>${ordersInfo.orderId }</li>
										<li>${ordersInfo.name }</li>
										<li>在线支付</li>
									</ul>
									<p class="fr">订单金额：<span>${ordersInfo.money }</span>元</p>
								</div>
								<div class="shohou clearfix">								
									<p class="fl"><a href="#">${ordersInfo.pName }</a><a href="#">数量: ${ordersInfo.count }</a></p>
									<p class="fr">
										<a href="<%=basePath%>toAlipayPage/${ordersInfo.orderId}/${ordersInfo.money}/${userId}">立即支付</a>
										<a href="<%=basePath%>findOrderInfoDetails/${ordersInfo.id }/${ordersInfo.orderId }/${userId}">订单详情</a>
									</p>
								</div>
							</div>
						</c:if>
						<c:if test="${ordersInfo.status==1 }">
							<div class="dkuang">
								<p class="one">待发货</p>
								<div class="word clearfix">
									<ul class="fl clearfix">
										<li>${ordersInfo.createTime }</li>
										<li>${ordersInfo.orderId }</li>
										<li>${ordersInfo.name }</li>
										<li>在线支付</li>
									</ul>
									<p class="fr">订单金额：<span>${ordersInfo.money }</span>元</p>
								</div>
								<div class="shohou clearfix">								
									<p class="fl"><a href="#">${ordersInfo.pName }</a><a href="#">数量: ${ordersInfo.count }</a></p>
									<p class="fr">
										<a href="<%=basePath%>editOrderInfoByOrderStatus1/${userId}/${ordersInfo.orderId }">催单</a>
										<a href="<%=basePath%>findOrderInfoDetails/${ordersInfo.id }/${ordersInfo.orderId }/${userId}">订单详情</a>
									</p>
								</div>
							</div>
						</c:if>
						<c:if test="${ordersInfo.status==2 }">
							<div class="dkuang clearfix deng">
								<p class="one">待收货</p>
								<div class="word clearfix">
									<ul class="fl clearfix">
										<li>${ordersInfo.createTime }</li>
										<li>${ordersInfo.orderId }</li>
										<li>${ordersInfo.name }</li>
										<li>在线支付</li>
									</ul>
									<p class="fr">订单金额：<span>${ordersInfo.money }</span>元</p>
								</div>
								<div class="shohou clearfix">									
									<p class="fl"><a href="#">${ordersInfo.pName }</a><a href="#">数量: ${ordersInfo.count }</a></p>
									<p class="fr">
										<a href="<%=basePath%>editOrderInfoByOrderStatus/${userId}/${ordersInfo.orderId }">确认收货</a>
										<a href="<%=basePath%>findOrderInfoDetails/${ordersInfo.id }/${ordersInfo.orderId }/${userId}">订单详情</a>
									</p>
								</div>
							</div>
						</c:if>
						<c:if test="${ordersInfo.status==3 }">
							<div class="dkuang clearfix deng">
								<p class="one">待评价</p>
								<div class="word clearfix">
									<ul class="fl clearfix">
										<li>${ordersInfo.createTime }</li>
										<li>${ordersInfo.orderId }</li>
										<li>${ordersInfo.name }</li>
										<li>在线支付</li>
									</ul>
									<p class="fr">订单金额：<span>${ordersInfo.money }</span>元</p>
								</div>
								<div class="shohou clearfix">									
									<p class="fl"><a href="#">${ordersInfo.pName }</a><a href="#">数量: ${ordersInfo.count }</a></p>
									<p class="fr">
										<a href="<%=basePath%>findOrderInfoDetails/${ordersInfo.id }/${ordersInfo.orderId }/${userId}">订单详情</a>
									</p>
								</div>
							</div>
						</c:if>
					</c:forEach>																				
				</div>
			</div>
		</div>
		<!--返回顶部-->
		<jsp:include page="gotop.jsp"></jsp:include>
		<!--footer-->
		<jsp:include page="footer.jsp"/>
		<script src="<%=basePath%>frontPage/js/jquery-1.12.4.min.js" type="text/javascript" charset="utf-8"></script>
		<script src="<%=basePath%>frontPage/js/public.js" type="text/javascript" charset="utf-8"></script>
		<script src="<%=basePath%>frontPage/js/user.js" type="text/javascript" charset="utf-8"></script>
	</body>
</html>
